// eslint-disable-next-line
import { UserLayout, BasicLayout } from '@/layouts'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '卓一慧众年会' },
    redirect: '/member/list',
    children: [
      // dashboard
      {
        path: '/member',
        name: 'member',
        redirect: '/member/list',
        component: RouteView,
        meta: { title: '员工管理' },
        children: [
          {
            path: '/member/list',
            name: 'MemberList',
            component: () => import('@/views/member/MemberList'),
            meta: { title: '员工列表' }
          }
        ]
      }
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/web/full',
    name: 'FullScreen',
    component: () => import(/* webpackChunkName: "user" */ '@/views/web/FullScreen')
  },
  {
    path: '/web/lottery',
    name: 'Lottery',
    component: () => import(/* webpackChunkName: "user" */ '@/views/web/Lottery')
  }
]
